﻿#region Using

using System;
using Microsoft.Practices.ServiceLocation;

#endregion

namespace Sharp.Framework.Logger
{
    ///<summary>
    ///</summary>
    public static class Log
    {

        #region 文件日志
        private static ILogger GetLog()
        {
            return ServiceLocator.Current.GetInstance<ILogger>();
        }

        ///<summary>
        ///</summary>
        ///<param name="msg"></param>
        public static void Info(string msg)
        {
            GetLog().Info(msg);
        }

        ///<summary>
        ///</summary>
        ///<param name="msg"></param>
        public static void Debug(string msg)
        {
            GetLog().Debug(msg);
        }


        ///<summary>
        ///</summary>
        ///<param name="msg"></param>
        public static void Warn(string msg)
        {
            GetLog().Warn(msg);
        }

        ///<summary>
        ///</summary>
        ///<param name="ex"></param>
        ///<param name="msg"></param>
        public static void Error(Exception ex, string msg)
        {
            GetLog().Error(ex, msg);
        }

        #endregion 
    }
}